package com.wx.service.impl;

import com.wx.dao.DoctorDao;
import com.wx.dao.impl.DoctorDaoImpl;
import com.wx.domain.Doctor;
import com.wx.service.DoctorService;

import java.util.List;

public class DoctorServiceImpl implements DoctorService {
    DoctorDao doctorDao=new DoctorDaoImpl();
    @Override
    public Doctor findByUsername(String username) {
        return  doctorDao.findByUsername(username);
    }

    @Override
    public List<String> getDepartments() {
        return doctorDao.getDepartment();
    }

    @Override
    public List<Doctor> getDoctors(String department, int pageIndex, int pageSize) {
        System.out.println(department);
        System.out.println(pageIndex+"--"+pageSize);
        return doctorDao.getDoctors(department,pageIndex,pageSize);
    }

    @Override
    public int getCountByDep(String department) {
        return doctorDao.getCountByDep(department);
    }

    @Override
    public void modifyPassword(String username, String password) {
        doctorDao.modifyPassword(username,password);
    }
}
